<extend name="Common@Base/common"/>
<block name="header">
    <include file="Public/_nav"/>
    <link type="text/css" rel="stylesheet" href="__CSS__/course.css"/>
    
</block>

<block name="body">
    <!--登录后显示个人区域-->
     <div class="col-md-2">           
           <include file="Public/sidebar"  />
     </div>
     <!--/登录后显示个人区域-->


     <div class="col-md-10 content-bordered">
     <div class="row">          
         <include file="_tab"/>
          <div class="white-box"> 
       <!-- <legend>{$thistitle}</legend>   -->  
          <h3><i class="icon-user"></i>{$thistitle}</h3> 
          <!--班级列表表单start-->                 
          <form class="form-horizontal form-condensed" role="form" method="post" id="classform" name="classform" >          
                 <div class="form-group">
                    <label class="col-md-2 control-label required">班 级：</label>
                      <div class="col-md-6">
                         <select name="bj_code" class="form-control"  style="width:210px;" role="form" onChange="this.form.submit()">
                             <volist name="classlist" id="v">
                                <option value="{$v.bj_code}"  <if condition="$cur eq $v['bj_code']">selected</if>  >{$v.bj_name}</option>            
                             </volist>                          
                        </select>
                      </div> 
                      <input class="btn btn-primary" value="提交"  type="submit" >
                    </div>
             </form>
              <!--班级列表表单end--> 
              <!--学生列表form start-->
                 <form class="form-horizontal form-condensed" role="form" method="post" id="stform" name="stform">

                    <div class="row">
                     <div class="col-md-10">
                       <table class="table table-bordered">

                       <thead>
                       <tr>
                       <th><div class="checkbox">
                            <label> <input id="check_all" type="checkbox" class="check-all"> 全选 </label>
                          </div>
                       </th>
                       <th>序号</th><th>姓名</th><th>PC</th>
                       <th>登录IP</th><th>最近登录</th>
                       <th>学期总扣分</th>
                       <th>#ID</th>
                       </tr>
                       </thead>
                                      
                       <volist name="list" id="v" >             
                       <tr>
                       <td><input class="ids" type="checkbox" name="ids[]" value="{$v.uid}"> {$v.uid}</td>
                       <td>{$i}</td>
                       <td>{$v.nickname}</td>
                       <td>{$v.pc}</td>
                       <td>{$v.last_login_ip|long2ip}</td>
                       <td>{$v.last_login_time|time_format}</td>
                       <td>{$v.score4}</td>                       
                       <td>{$v.uid}</td>
                        </tr>
                        </volist>
                        <tr><td> <label><input class="check-all" type="checkbox"> 全选 </label></td>
                        <td colspan="4"><label class="col-md-5 control-label required">扣分原因：</label>
                      <select name="dec_id" class="form-control"  style="width:150px;" role="form">
                 <volist name="scorelist" id="v">
                 <option value="{$v.id}">{$v.title}</option>
                 </volist></select></td><td colspan="3"><input type="submit" class="btn btn-primary" value="提交">&nbsp;&nbsp;&nbsp;&nbsp;<input name="del" type="submit" class="btn btn-warning" value="重填">	</td></tr>
                       </table>
                     </div>
                   </div>
                 </form>
	        <script>
	           
	            $(".check-all").on('click',function() { 
	                $("input[name='ids[]']").prop("checked", this.checked);	                
	             });
	            /**checkbox选择联动*/	            
	            $(".ids,.check-all").on('click',function() {
	            	var $ids = $('[name="ids[]"]:checkbox');
	               $(".check-all").prop("checked" , $ids.length == $ids.filter(":checked").length);  
	             }); 
	        </script>
              </div>
              <!--学生列表form end-->
     </div>
</block>